<template>
  <div>
    <div class="header">
      <van-icon class="back" @click="goback" size="28px" name="arrow-left" />
      <div class="title">{{ name }}</div>
    </div>
    <div class="space"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    goback() {
      this.$router.go(-1);
    },
  },
  props: ["name"],
};
</script>

<style scoped lang="less">
.header {
  position: fixed;
  z-index: 10000;
  background-color: #fff;
  height: 200px;
  width: 100%;
  border-bottom: 1px solid #f1f1f1;
  padding-top: 10px;
  height: 30px;

  .back {
    position: absolute;
    top: 10px;
    left: 20px;
  }

  .title {
    margin-top: 4px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
  }
}

.space {
  height: 30px;
}
</style>
